How It Works
 
All QTKit capture applications make use of three basic types of objects: capture inputs, capture
outputs, and a capture session. Capture inputs, which are subclasses of QTCaptureInput, provide
the necessary interfaces to different sources of captured media.
 
A QTCaptureDeviceInput object, which is a subclass of QTCaptureInput, provides an interface to
capturing from various audio/video hardware, such as cameras and microphones. Capture outputs,
which are subclasses of QTCaptureOutput, provide the necessary interfaces to various destinations
for media, such as QuickTime movie files, or video and audio previews.
A capture session, which is a QTCaptureSession object, manages how media that is captured from
connected input sources is distributed to connected output destinations. Each input and output has
one or more connection, which represents a media stream of a certain QuickTime media type, such
as video or audio media. A QTCaptureSession will attempt to connect all input connections to each
of its outputs.
The illustration below shows how a QTCaptureSession works. This is accomplished by connecting inputs to
outputs in order to record and preview video from a camera.